//
//  HEIntegralDetailsViewController.m
//  HealthFamily
//
//  Created by 吴欧 on 2020/12/11.
//  Copyright © 2020 honglutec. All rights reserved.
//

#import "HEIntegralDetailsViewController.h"
#import "HEIntegralIncomeViewController.h"

#import "MJCSegmentInterface.h"

@interface HEIntegralDetailsViewController ()

@end

@implementation HEIntegralDetailsViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.title = @"康币明细";
    
    self.zx_navLineView.hidden = YES;
    
    [self initUI];
}

- (void)initUI {
    
    NSArray *titles = @[@"收入",@"支出"]; 

    NSMutableArray *vcs = @[].mutableCopy;
    
    HEIntegralIncomeViewController *inVC = [HEIntegralIncomeViewController new];
    inVC.point_oper = 0;
    
    HEIntegralIncomeViewController *outVC = [HEIntegralIncomeViewController new];
    outVC.point_oper = 1;

    [vcs addObject:inVC];
    [vcs addObject:outVC];

    
    MJCSegmentStylesTools *tools = [MJCSegmentStylesTools jc_initWithSegmentStylestoolsBlock:^(MJCSegmentStylesTools *jc_tools) {
        jc_tools.
        jc_titleBarStyles(MJCTitlesScrollStyle).
        jc_titlesViewFrame(CGRectMake(0, ZXNavBarHeight, self.view.jc_width, 47)).
        jc_indicatorStyles(MJCIndicatorEqualTextEffect).
        jc_indicatorFrame(CGRectMake(0, 47-3, 0, 3)).
        jc_titlesViewBackColor([UIColor whiteColor]).
        jc_itemTextSelectedColor(UIColorBlack).
        jc_itemTextNormalColor([UIColor darkGrayColor]).
        jc_itemTextZoomEnabled(YES, 17).
        jc_itemTextFontSize(15).
        jc_defaultItemShowCount(5).
        jc_childsContainerBackColor([UIColor whiteColor]).
        jc_indicatorColor(CNavBgColor).
        jc_indicatorHidden(NO).
        jc_indicatorsAnimalsEnabled(YES).
        jc_childScollEnabled(YES).
        jc_childScollAnimalEnabled(YES).
        jc_indicatorFollowEnabled(YES).
        jc_itemTextsEdgeInsets(UIEdgeInsetsMake(10,10,10,10)).
        jc_itemTextGradientEnabled(YES).
        jc_itemSelectedSegmentIndex(self->_index);
    }];
    
    MJCSegmentInterface *interFace = [MJCSegmentInterface initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight) interFaceStyletools:tools];
    [self.view addSubview:interFace];
    [interFace intoTitlesArray:titles intoChildControllerArray:vcs hostController:self];
    
    interFace.qmui_borderPosition = QMUIViewBorderPositionBottom;
    interFace.qmui_borderWidth = 1;
    interFace.qmui_borderColor = CSplitLineColor;
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
